package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

@Setter
@Getter
public class Classinfo {
    private Long id;

    private String name;

    private Integer number;

    private Long employee_id;
    //关联员工表
    private Employee emp;

    //把部门转为json字符串
    public String getJson(){
        //不能直接传事件源this,转换成城map集合
        HashMap map = new HashMap();
        map.put("name",name);
        map.put("number",number) ;
        map.put("employee_id",employee_id);
        return JSON.toJSONString(map);
    }


}